<?php

namespace App\Model;

use Hyperf\Database\Model\Builder;
use Illuminate\Database\Eloquent\Model;

/**
 * 公会
 */
class GuildManage extends Model
{

    protected $connection = 'guild';
    protected $table = 'guild_manage';


    /**
     * 获取超级推广员管理的推广员
     * @param $adminId
     * @return void
     */
    public static function getGuidIdByAdminId($adminId = 0)
    {
        $ids = self::where('admin_id', $adminId)->pluck('id')->toArray();
        return $ids ? $ids : [];
    }

    public static function getGuidIdByGuildUserId($adminId = 0)
    {
        $ids = self::where('admin_id', $adminId)->pluck('id')->toArray();
        return $ids ? $ids : [];
    }

}
